package com.rongc.client.freight.base.view.adapter;

import android.content.Context;

import com.rongc.client.freight.R;
import com.rongc.client.freight.base.model.BaseDic;

import java.util.List;

/**
 * Created by ccqx on 2017/6/28.
 */

public class RecyclerMineAdapter extends RecyclerBaseAdapter<String>{


    public RecyclerMineAdapter(Context mContext, List<String> mDatas) {
        super(mContext, mDatas);
    }

    @Override
    protected void onBind(final BaseRecyclerViewHolder holder, int position, String data) {

        switch (data){
            case BaseDic.MineType.AUTH_TYPE:
                holder.setText(R.id.tv_content,R.string.mine_auth_title);
                holder.getTextView(R.id.tv_content).setCompoundDrawablesWithIntrinsicBounds(mContext.getResources().getDrawable(R.mipmap.me_icon_renzheng),null,null,null);
                break;
            case BaseDic.MineType.SHOP_TYPE:
                holder.setText(R.id.tv_content,R.string.mine_shop_title);
                holder.getTextView(R.id.tv_content).setCompoundDrawablesWithIntrinsicBounds(mContext.getResources().getDrawable(R.mipmap.me_icon_shop),null,null,null);
                break;
            case BaseDic.MineType.CAR_TYPE:
                holder.setText(R.id.tv_content,R.string.mine_car_title);
                holder.getTextView(R.id.tv_content).setCompoundDrawablesWithIntrinsicBounds(mContext.getResources().getDrawable(R.mipmap.me_icon_car),null,null,null);
                break;
            case BaseDic.MineType.CHECK_IN_TYPE:
                holder.setText(R.id.tv_content,R.string.mine_checkin_title);
                holder.getTextView(R.id.tv_content).setCompoundDrawablesWithIntrinsicBounds(mContext.getResources().getDrawable(R.mipmap.me_icon_qiandao),null,null,null);
                break;
            case BaseDic.MineType.COMMENT_TYPE:
                holder.setText(R.id.tv_content,R.string.mine_comment_title);
                holder.getTextView(R.id.tv_content).setCompoundDrawablesWithIntrinsicBounds(mContext.getResources().getDrawable(R.mipmap.me_icon_pingjia),null,null,null);
                break;
            case BaseDic.MineType.INVITE_TYPE:
                holder.setText(R.id.tv_content,R.string.mine_invite_title);
                holder.getTextView(R.id.tv_content).setCompoundDrawablesWithIntrinsicBounds(mContext.getResources().getDrawable(R.mipmap.me_icon_invite),null,null,null);
                break;
            case BaseDic.MineType.SETTING_TYPE:
                holder.setText(R.id.tv_content,R.string.mine_setting_title);
                holder.getTextView(R.id.tv_content).setCompoundDrawablesWithIntrinsicBounds(mContext.getResources().getDrawable(R.mipmap.me_icon_set),null,null,null);
                break;
        }



    }

    @Override
    protected int getLayoutId() {
        return R.layout.recycler_mine_item;
    }
}
